﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SageKing.Blazor.OpenIdService.Migrations.Template
{
    /// <inheritdoc />
    public partial class change_SourceType_Template : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "SourceName",
                table: "TemplateConfig",
                newName: "SourceType");

            migrationBuilder.RenameIndex(
                name: "IX_TemplateConfig_TemplateId_SourceName_KKey",
                table: "TemplateConfig",
                newName: "IX_TemplateConfig_TemplateId_SourceType_KKey");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "SourceType",
                table: "TemplateConfig",
                newName: "SourceName");

            migrationBuilder.RenameIndex(
                name: "IX_TemplateConfig_TemplateId_SourceType_KKey",
                table: "TemplateConfig",
                newName: "IX_TemplateConfig_TemplateId_SourceName_KKey");
        }
    }
}
